{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# pandas.DataFrame\n",
    "# http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html\n",
    "'''\n",
    "pd.DataFrame(data, index, columns)\n",
    "\n",
    "pd.DataFrame.from_records()\n",
    "pd.DataFrame.from_dict()\n",
    "pd.DataFrame.from_items()\n",
    "\n",
    "pd.read_excel()\n",
    "\n",
    "\n",
    "view data查看视图\n",
    "pd.head()\n",
    "pd.tail()\n",
    "\n",
    "index and selection 选中区域\n",
    "\n",
    "df.count()\n",
    "df.shape\n",
    "df.describe()\n",
    "\n",
    "\n",
    "\n",
    "选中不存在的index赋值也是新增行\n",
    "df = DataFrame([ [ 1, 2, 3], [4, 5, 6] ])\n",
    "df.loc[2] = [7, 8, 9]\n",
    "\n",
    "通过append或concat新增行\n",
    "pandas.DataFrame.append()\n",
    "pandas.concat()\n",
    "\n",
    "Combining / joining / merging\n",
    "DataFrame.append(other[, ignore_index, …])\tAppend rows of other to the end of caller, returning a new object.\n",
    "DataFrame.assign(**kwargs)\tAssign new columns to a DataFrame.\n",
    "DataFrame.join(other[, on, how, lsuffix, …])\tJoin columns of another DataFrame.\n",
    "DataFrame.merge(right[, how, on, left_on, …])\tMerge DataFrame or named Series objects with a database-style join.\n",
    "DataFrame.update(other[, join, overwrite, …])\tModify in place using non-NA values from another DataFrame.\n",
    "\n",
    "删除行和列都可以用drop\n",
    "axis == 0  平行于axis == 0 or index遍历\n",
    "axis == 1  平行于axis == 1 or column遍历\n",
    "\n",
    "pandas.DataFrame.to_dict\n",
    "http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_dict.html#pandas.DataFrame.to_dict\n",
    "\n",
    "\n",
    "pandas.DataFrame.cumsum\n",
    "http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.cumsum.html#pandas.DataFrame.cumsum\n",
    "'''\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
